import Vue from 'vue';
import App from './App.vue'

import createRouter from './router'
import createStore from './store'

// 为了兼容服务端  要把这个方法改早成 函数   不会说造成每个客户端访问的都是这个实例
function createApp(){
  let router = createRouter()
  let store = createStore()
  let app = new Vue({
    router,
    store,
    render: h => h(App)
  })
  return {
    app,
    router,
    store
  }
}

export default createApp